﻿
/*
 *┌────────────────────────────────────────────────┐
 *│　描   述：GeneralLedger                                                    
 *│　作   者：Zps                                              
 *│　版   本：1.0                                              
 *│　创建时间：2019/10/9 16:11:52                        
 *└────────────────────────────────────────────────┘
 */
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace JT.Domain
{
    public class GeneralLedger
    {
        public int Id { get; set; }
        [DisplayName("摘要ID")]
        public int? SummaryId { get; set; }


        [Display(Name = "总账")]
        [Required(ErrorMessage = "总账不能为空")]
        public string GLName { get; set; }

        [Display(Name = "明细")]
        public string Detail { get; set; }

        [Display(Name = "借方金额")]
        //[Column(TypeName = "decimal(18, 2)")]
        public double? DebitAmount { get; set; }

        [Display(Name = "贷方金额")]
        //[Column(TypeName = "decimal(18, 2)")]
        public double? CreditAmount { get; set; }

        [Display(Name = "合计")]
        //[Required(ErrorMessage = "此项不能为空!")]
        public double? Footing { get; set; }

        [ForeignKey(nameof(SummaryId))]

        public Summary SummaryNavigation { get; set; }

    }
}